package org.apache.axis2.json.Utils;

import org.apache.axis2.json.rpc.JsonRPCMessageReceiver;

import java.io.*;

/**
 * Created by IntelliJ IDEA.
 * User: shameera
 * Date: 2/2/12
 * Time: 12:26 AM
 * To change this template use File | Settings | File Templates.
 */
public class Main {

    public static void main(String[] args) throws FileNotFoundException {
        String serviceName ="services.PojoServiceClass";
        JsonMessageContext inJson = new JsonMessageContext();
        JsonMessageContext outJson = new JsonMessageContext();

        InputStream in = new FileInputStream(new File("src/main/resources/testIn.txt"));
        OutputStream out = new FileOutputStream(new File("src/main/resources/testOut.txt"));

        inJson.setInMsgStream(in);
        outJson.setOutMsgStream(out);
        inJson.setSerivceName(serviceName);
        outJson.setSerivceName(serviceName);

        JsonRPCMessageReceiver jsonMsgReceiver = new JsonRPCMessageReceiver();
        jsonMsgReceiver.receive(inJson , outJson);
    }
}
